import { http } from "@/utils/http";
import { Result, arrayResult } from "../types";

// 添加巡检路线
export const addInspectionroute = (data) => {
    return http.request<Result>("post", "/api/inspectionroute/Add", { data });
};

// 更新巡检路线
export const upDataInspectionroute = (data) => {
    return http.request<Result>("post", "/api/inspectionroute/Update", { data });
};

// 更新巡检路线状态
export const upDataStatusInspectionroute = (data) => {
    return http.request<Result>("post", "/api/inspectionroute/UpdateStatus", { data });
};

// 删除巡检路线
export const deleteInspectionroute = (id) => {
    return http.request<Result>("post", `/api/inspectionroute/Delete/${id}`);
};

// 单个巡检路线查询
export const getInspectionroute = (id) => {
    return http.request<arrayResult>("get", `/api/inspectionroute/Get/${id}`, {});
};

// 列表
export const inspectionrouteList = (params) => {
    return http.request<arrayResult>("get", `/api/inspectionroute/List`, { params });
};